<?php

function ovalol_autoload( $classname )
{
        $lvls = array("", "../", "../../", "../../../", "../../../../");
        $dirs = array("", "core/", "format/", "helpers/");
        $exts = array(".class.php",".interface.php",".model.php");
        foreach($lvls as $lvl )
        {
                foreach( $dirs as $dir )
                {
                        foreach( $exts as $ext )
                        {
                                if( file_exists($lvl.$dir.$classname.$ext) )
                                        require_once $lvl.$dir.$classname.$ext;
                        }
                }
        }
}
spl_autoload_register( 'ovalol_autoload', TRUE, TRUE);

?>
